import { createApp } from 'vue';
import { components, plugins } from "./utils/elementImport";
import App from './App.vue';
import { router } from "./router/index";
import './index.css';
import './assets/css/common.css';


// 初始化 Vue3 
export const app = createApp(App);

// 按需加载 element-ui
components.forEach(component => {
    app.component(component.name, component);
});

plugins.forEach(plugin => {
    app.use(plugin);
});

// 初始化路由
app.use(router);

app.mount("#app");

